//
//  CommonInsetInfoViewTableViewCell.m
//  EnterpriseEdition
//
//  Created by ypj on 2021/10/10.
//

#import "CommonInsetInfoViewTableViewCell.h"

@implementation CommonInsetInfoViewTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.contentLb.delegate=self;
    self.iconImage.hidden=YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
+(CGFloat)cellHeight{
    return 44;
}
+(NSString *)reuseIdentifier{
    return @"CommonInsetInfoViewTableViewCell";
}
-(void)textFieldDidEndEditing:(UITextField *)textField
{
    [textField resignFirstResponder];
    self.currentValueBlock(self.contentLb.text, self.indexPath);
}
#pragma mark  把输入的值和完没完成的bool变量传过去
-(BOOL)textFieldShouldReturn:(UITextField *)textField
{
    [textField resignFirstResponder];
    self.currentValueBlock(self.contentLb.text, self.indexPath);
    return YES;
}
-(void)textFieldDidChangeSelection:(UITextField *)textField{
    if (textField.tag==100){
            if (textField.text.length > 6) {
                textField.text = [textField.text substringToIndex:6];
            }
    }else if (textField.tag==101){
        if (textField.text.length > 6){
            textField.text = [textField.text substringToIndex:6];
        }
    }
}
@end
